﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Field.Manage" %>


<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!doctype html>
<html>
<head runat="server">
    <title>字段管理</title>
    <meta charset="utf-8">
    <meta content="no-cache" http-equiv="Pragma" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    

    <%: Styles.Render("~/Content/Bootstrap/css") %>

    

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table cellspacing="0" cellpadding="4" width="100%" border="0" id="NavigationPath">
                <tr>
                    <td style="width: auto"><asp:Label ID="lblPath" runat="server"></asp:Label>
                    </td>
                    <td style="width: auto">
                        <a href="Add.aspx?ModelId=<%= Request["ModelId"] %>">添加字段</a>
                    </td>
                </tr>
            </table>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="ID" 
                onrowdeleting="GV_List_RowDeleting" GridLines="None" CssClass="table table-bordered table-condensed table-hover">
                <Columns>
                 
                    <asp:HyperLinkField DataNavigateUrlFields="ID,ModelId" DataTextField="FieldName" 
                        HeaderText="字段名称" DataNavigateUrlFormatString="Add.aspx?ModelId={1}&ID={0}" ><HeaderStyle Width="120px" />
                        <ItemStyle CssClass="NR" />
                     </asp:HyperLinkField>
                    
                    <asp:BoundField DataField="Title" HeaderText="字段标题">
                        <HeaderStyle Width="120px" />
                        <ItemStyle CssClass="NR"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="ModelName" HeaderText="所属模型">
                        <HeaderStyle Width="80px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FieldType" HeaderText="字段类型">
                    <HeaderStyle Width="100px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MaxFieldLength" HeaderText="字段宽度" HtmlEncode="False">
                    <HeaderStyle Width="60px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DefaultValue" HeaderText="默认值" />
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="lblDelete" runat="server" CausesValidation="False" 
                                CommandName="Delete" OnClientClick="return confirm('您确定要删除？');" Text="删除"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" Width="40px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    
                    
                </Columns>
                <HeaderStyle CssClass="HeaderStyle" />
            </asp:GridView>
           
                <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging">
                </WinnerCMS:PageNavigation>
          
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
